package it.polimi.comorazio.activities;

import it.polimi.comorazio.PoweredByActivity;
import it.polimi.comorazio.R;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.widget.Button;

public class MainActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);

		// int counter;
		// Button add, sub;
		// TextView result;
		// counter = 0;
		// add = (Button) findViewById(R.id.bAdd);
		// sub = (Button) findViewById(R.id.bSub);
		// result = (TextView) findViewById(R.id.result);

		// add.setOnClickListener(new View.OnClickListener() {
		// @Override
		// public void onClick(View v) {
		// counter++;
		// result.setText("Your total is " + counter);
		// }
		// });

		// sub.setOnClickListener(new View.OnClickListener() {
		// @Override
		// public void onClick(View v) {
		// counter--;
		// result.setText("Your total is " + counter);
		// }
		// });

		Button bCityInfo = (Button) findViewById(R.id.bInfo);
		bCityInfo.setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {
				Intent intent = new Intent(getApplicationContext(),
						CityInfo.class);
				startActivity(intent);
			}
		});

		Button bTransportInfo = (Button) findViewById(R.id.bTransport);
		bTransportInfo.setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {
				Intent intent = new Intent(getApplicationContext(),
						TransportInfo.class);
				startActivity(intent);
			}
		});

		Button bSkipToApp = (Button) findViewById(R.id.bSkip);
		bSkipToApp.setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {
				Intent intent = new Intent("it.polimi.comorazio.MENU");
				startActivity(intent);
			}
		});

		Button bPoweredBy = (Button) findViewById(R.id.bPoweredBy);
		bPoweredBy.setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {
				Intent intent = new Intent(getApplicationContext(),
						PoweredByActivity.class);
				startActivity(intent);
			}
		});
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		// getMenuInflater().inflate(R.menu.activity_main, menu);
		return true;
	}

}
